/*
 * Created on 2007-8-28
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.tongji.quickCRUDQ.dao.jdbc;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.tongji.quickCRUDQ.define.Column;
import com.tongji.quickCRUDQ.define.Row;
import com.tongji.quickCRUDQ.define.Table;
  

/**  
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public interface DatabaseFormat {

	public Object formatValue(Column column, String value) ;
	public Object formatValue(int type, String value) ;
	public String formatDateSql(Date date);

	public StringBuffer formatWhere(List columns, Map data);
	public String formatDefaultWhere(List columns, Map data, Table table);

	public String formatField(Column column);
	public String formatNameValuePair(Column column, String value, int operator);
	public int mapColumnType(Column column);
	public StringBuffer formatSelect(Row row);
//	public StringBuffer formatInsert(Row row);
	public StringBuffer formatInsert(Row row,Map values);
//	public StringBuffer formatUpdate(Row row);
	public StringBuffer formatUpdate(Row row,Map values);
	public StringBuffer formatDelete(Row row);
	public Object[] formatObjectArray(Row row, Map values, String id);
}
